import type { AxiosRequestConfig, AxiosResponse } from "axios"

export interface ILSRequestInterceptors<T = AxiosResponse> {
  requestInterceptor?: (config: AxiosRequestConfig) => AxiosRequestConfig
  requestInterceptorCatch?: (error: any) => any

  responseInterceptor?: (config: AxiosResponse) => AxiosResponse
  responseInterceptorCatch?: (error: any) => any
}

export interface ILSRequestConfig<T = AxiosResponse>
  extends AxiosRequestConfig {
  interceptors?: ILSRequestInterceptors<T>
  showLoading?: boolean
}
